package cn.stylefeng.guns.order.entity;

import cn.stylefeng.guns.core.pojo.base.entity.BaseEntity;
import cn.stylefeng.guns.orderitem.entity.OrderItem;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * order
 *
 * @author aria
 * @date 2021/02/20 20:24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("orders")
public class Order extends BaseEntity {

    /**
     * 订单号
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 商品总价格
     */
    @TableField("total_price")
    private Double totalPrice;

    /**
     * 地址
     */
    @TableField("address")
    private String address;

    /**
     * 订单生成时间
     */
    @TableField("borrow_data")
    private Date borrowData;

    /**
     * 归还时间
     */
    @TableField("Return_data")
    private Date returnData;

    @TableField("status")
    private String status;

    @TableField("phone")
    private String phone;

    @TableField(exist = false)
    private List<OrderItem> items;

}
